diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 0000000..fb20f97
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,11 @@
+on: push
+
+jobs:
+  build-linux:
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v1
+      - run: sudo apt-get install --assume-yes libpcre3-dev libfuse-dev fuse libxml2-dev attr
+      - run: make
+      - run: ./test.sh
+
diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml
new file mode 100644
index 0000000..68a1c4c
--- /dev/null
+++ b/.github/workflows/codeql-analysis.yml
@@ -0,0 +1,71 @@
+# For most projects, this workflow file will not need changing; you simply need
+# to commit it to your repository.
+#
+# You may wish to alter this file to override the set of languages analyzed,
+# or to provide custom queries or build logic.
+#
+# ******** NOTE ********
+# We have attempted to detect the languages in your repository. Please check
+# the `language` matrix defined below to confirm you have the correct set of
+# supported CodeQL languages.
+#
+name: "CodeQL"
+
+on:
+  push:
+    branches: [ master ]
+  pull_request:
+    # The branches below must be a subset of the branches above
+    branches: [ master ]
+  schedule:
+    - cron: '18 20 * * 0'
+
+jobs:
+  analyze:
+    name: Analyze
+    runs-on: ubuntu-latest
+    permissions:
+      actions: read
+      contents: read
+      security-events: write
+
+    strategy:
+      fail-fast: false
+      matrix:
+        language: [ 'cpp' ]
+        # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
+        # Learn more about CodeQL language support at https://git.io/codeql-language-support
+
+    steps:
+    - run: sudo apt-get install --assume-yes libpcre3-dev libfuse-dev fuse libxml2-dev attr
+    - name: Checkout repository
+      uses: actions/checkout@v2
+
+    # Initializes the CodeQL tools for scanning.
+    - name: Initialize CodeQL
+      uses: github/codeql-action/init@v1
+      with:
+        languages: ${{ matrix.language }}
+        # If you wish to specify custom queries, you can do so here or in a config file.
+        # By default, queries listed here will override any specified in a config file.
+        # Prefix the list here with "+" to use these queries and those in the config file.
+        # queries: ./path/to/local/query, your-org/your-repo/queries@main
+
+    # Autobuild attempts to build any compiled languages  (C/C++, C#, or Java).
+    # If this step fails, then you should remove it and run the build manually (see below)
+    - name: Autobuild
+      uses: github/codeql-action/autobuild@v1
+
+    # ℹ️ Command-line programs to run using the OS shell.
+    # 📚 https://git.io/JvXDl
+
+    # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
+    #    and modify them (or add more) to build your code if your project
+    #    uses a compiled language
+
+    #- run: |
+    #   make bootstrap
+    #   make release
+
+    - name: Perform CodeQL Analysis
+      uses: github/codeql-action/analyze@v1
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 11dbb72..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,21 +0,0 @@
-language: cpp
-
-matrix:
-  include:
-    - os: linux
-      compiler: gcc
-      dist: trusty
-      sudo: required
-      addons:
-        apt:
-          sources:
-            - ubuntu-toolchain-r-test
-          packages:
-            - attr
-            - fuse
-            - libfuse-dev
-            - libpcre3-dev
-            - libxml2-dev
-
-script:
-  - make
diff --git a/Makefile b/Makefile
index 23d91f0..a89d044 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
-CC=g++
-CFLAGS=-Wall -ansi -D_FILE_OFFSET_BITS=64 -DFUSE_USE_VERSION=26 -DELPP_SYSLOG -DELPP_NO_DEFAULT_LOG_FILE -DELPP_THREAD_SAFE -std=c++11 `xml2-config --cflags` 
-LDFLAGS=-Wall -ansi -lpcre -lfuse `xml2-config --libs` -lpthread
+CXX?=g++
+CXXFLAGS+=-Wall -ansi -D_FILE_OFFSET_BITS=64 -DFUSE_USE_VERSION=26 -DELPP_SYSLOG -DELPP_NO_DEFAULT_LOG_FILE -DELPP_THREAD_SAFE -std=c++11 `xml2-config --cflags`
+LDFLAGS+=-Wall -ansi -lpcre -lfuse `xml2-config --libs` -lpthread
 srcdir=src
 easyloggingdir=vendor/github.com/muflihun/easyloggingpp/src
 builddir=build
@@ -11,33 +11,32 @@ $(builddir):
 	mkdir $(builddir)
 
 loggedfs: $(builddir)/loggedfs.o $(builddir)/Config.o $(builddir)/Filter.o $(builddir)/easylogging.o
-	$(CC) -o loggedfs $(builddir)/loggedfs.o $(builddir)/Config.o $(builddir)/Filter.o $(builddir)/easylogging.o $(LDFLAGS)
+	$(CXX) $(CPPFLAGS) -o loggedfs $(builddir)/loggedfs.o $(builddir)/Config.o $(builddir)/Filter.o $(builddir)/easylogging.o $(LDFLAGS)
 
 $(builddir)/loggedfs.o: $(builddir)/Config.o $(builddir)/Filter.o $(srcdir)/loggedfs.cpp
-	$(CC) -o $(builddir)/loggedfs.o -c $(srcdir)/loggedfs.cpp $(CFLAGS) -Ivendor/github.com/muflihun/easyloggingpp/src
+	$(CXX) $(CPPFLAGS) -o $(builddir)/loggedfs.o -c $(srcdir)/loggedfs.cpp $(CXXFLAGS) -I$(easyloggingdir)
 
 $(builddir)/Config.o: $(builddir)/Filter.o $(srcdir)/Config.cpp $(srcdir)/Config.h
-	$(CC) -o $(builddir)/Config.o -c $(srcdir)/Config.cpp $(CFLAGS)
+	$(CXX) $(CPPFLAGS) -o $(builddir)/Config.o -c $(srcdir)/Config.cpp $(CXXFLAGS)
 
 $(builddir)/Filter.o: $(srcdir)/Filter.cpp $(srcdir)/Filter.h
-	$(CC) -o $(builddir)/Filter.o -c $(srcdir)/Filter.cpp $(CFLAGS)
+	$(CXX) $(CPPFLAGS) -o $(builddir)/Filter.o -c $(srcdir)/Filter.cpp $(CXXFLAGS)
 
 $(builddir)/easylogging.o: $(easyloggingdir)/easylogging++.cc $(easyloggingdir)/easylogging++.h
-	$(CC) -o $(builddir)/easylogging.o -c $(easyloggingdir)/easylogging++.cc $(CFLAGS)	
+	$(CXX) $(CPPFLAGS) -o $(builddir)/easylogging.o -c $(easyloggingdir)/easylogging++.cc $(CXXFLAGS)
 
 clean:
 	rm -rf $(builddir)/
-	
+
 install:
-	gzip --keep loggedfs.1
-	cp loggedfs.1.gz /usr/share/man/man1/
-	cp loggedfs /usr/bin/
-	cp loggedfs.xml /etc/
+	mkdir -p $(DESTDIR)/usr/share/man/man1 $(DESTDIR)/usr/bin $(DESTDIR)/etc
+	gzip < loggedfs.1 > $(DESTDIR)/usr/share/man/man1/loggedfs.1.gz
+	cp loggedfs $(DESTDIR)/usr/bin/
+	cp loggedfs.xml $(DESTDIR)/etc/
 
 
 mrproper: clean
 	rm -rf loggedfs
-			
+
 release:
 	tar -c --exclude="CVS" $(srcdir)/ loggedfs.xml LICENSE loggedfs.1.gz Makefile | bzip2 - > loggedfs.tar.bz2
-
diff --git a/README.md b/README.md
index c41da90..387d236 100644
--- a/README.md
+++ b/README.md
@@ -2,50 +2,51 @@
 
 [![Build Status](https://travis-ci.org/rflament/loggedfs.svg?branch=feature%2Feasylogging%2B%2B)](https://travis-ci.org/rflament/loggedfs)
 
-Donate Ethereum: 0x83FBC94FBca4e2f10Bede63e16C5b0Bb31a1Fed1
+Donate Ethereum: 0xd13338639d2d3eCeBea0B53C8E4C9085aa21Ccb2
 
 ## Description
 
-LoggedFS is a fuse-based filesystem which can log every operations that happens in it. 
+LoggedFS is a [FUSE](https://en.wikipedia.org/wiki/Filesystem_in_Userspace)-based filesystem which can log every operations that happens in it.
 
-How does it work ?
+### How does it work ?
 
-Fuse does almost everything. LoggedFS only sends a message to syslog when called by fuse and then let the real filesystem do the rest of the job.
+FUSE does almost everything. LoggedFS only sends a message to syslog when called by FUSE and then let the real filesystem do the rest of the job.
 
 ## Installation
 
-If loggedfs is included in your distribution you can just install with your package manager :
+If LoggedFS 0.9 is included in your distribution you can just install with your package manager:
 
-    sudo apt-get install loggedfs   
+    sudo apt-get install loggedfs
 
 ## Simplest usage
 
-To record access to /tmp/TEST into ~/log.txt, just do:
+To record access to `/tmp/TEST` into `~/log.txt`, just do:
 
-    loggedfs -l ~/log.txt /tmp/TEST 
+    loggedfs -l ~/log.txt /tmp/TEST
 
-To stop recording, just unmount as usual:
+To stop recording, just `unmount` as usual:
 
     sudo umount /tmp/TEST
-    
-~/log.txt will need to be changed to readable by setting permissions:
-    
+
+The `~/log.txt` file will need to be changed to readable by setting permissions:
+
     chmod 0666 ~/log.txt
-    
+
 ## Installation from source
 
-First you have to make sure that fuse is installed on your computer. 
-If you have a recent distribution it should be. Fuse can be downloaded here : https://github.com/libfuse/libfuse.
+First you have to make sure that FUSE is installed on your computer.
+If you have a recent distribution it should be. FUSE can be downloaded here: [github.com/libfuse/libfuse](https://github.com/libfuse/libfuse).
 
-Then you should download the loggedfs archive and install it with the make command :
+Then you should download the LoggedFS source code archive and install it with the `make` command:
 
     sudo apt-get install libfuse-dev libxml2-dev libpcre3-dev
-    tar xfj loggedfs-X.Y.tar.bz2
-    cd loggedfs-X.Y
+    wget https://github.com/rflament/loggedfs/archive/loggedfs-0.X.tar.gz
+    tar xfz loggedfs-0.X.tar.gz
+    cd loggedfs-loggedfs-0.X
     make
     make install
-    
-LoggedFS has the following dependencies :
+
+LoggedFS has the following dependencies:
 
     fuse
     pcre
@@ -58,7 +59,7 @@ LoggedFS can use an XML configuration file if you want it to log operations only
 Here is a sample configuration file :
 
     <?xml version="1.0" encoding="UTF-8"?>
-    
+
     <loggedFS logEnabled="true" printProcessName="true">
       <includes>
         <include extension=".*" uid="*" action=".*" retname=".*"/>
@@ -70,13 +71,13 @@ Here is a sample configuration file :
       </excludes>
     </loggedFS>
 
-This configuration can be used to log everything except it if concerns a *.bak file, or if the uid is 1000, or if the operation is getattr.
+This configuration can be used to log everything except it if concerns a `*.bak` file, or if the uid is 1000, or if the operation is `getattr`.
 
 ## Launching LoggedFS
 
 If you just want to test LoggedFS you don't need any configuration file.
- 
-Just use that command :
+
+Just use that command:
 
     loggedfs -f -p /var
 
@@ -103,10 +104,10 @@ You should see logs like these :
     2018-03-21 15:32:15,892 INFO [default] getattr /var/lib/apt/lists/partial {SUCCESS} [ pid = 1539 update-notifier uid = 1000 ]
     2018-03-21 15:32:17,873 INFO [default] LoggedFS closing.
 
-If you have a configuration file to use you should use this command :
+If you have a configuration file to use you should use this command:
 
     ./loggedfs -c loggedfs.xml -p /var
 
-If you want to log what other users do on your filesystem, you should use the -p option to allow them to see your mounted files. For a complete documentation see the manual page
+If you want to log what other users do on your filesystem, you should use the `-p` option to allow them to see your mounted files. For a complete documentation see the manual page.
 
-Rémi Flament - remipouak at gmail.com
\ No newline at end of file
+Rémi Flament - remipouak at gmail.com
diff --git a/src/loggedfs.cpp b/src/loggedfs.cpp
index 55a2dc6..dfab611 100644
--- a/src/loggedfs.cpp
+++ b/src/loggedfs.cpp
@@ -1,7 +1,7 @@
 /*****************************************************************************
  * Author:   Remi Flament <remipouak at gmail dot com>
  *****************************************************************************
- * Copyright (c) 2005 - 2018, Remi Flament
+ * Copyright (c) 2005 - 2022, Remi Flament and contributors
  *
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -78,7 +78,8 @@ struct LoggedFS_Args
 {
     char *mountPoint; // where the users read files
     char *configFilename;
-    bool isDaemon; // true == spawn in background, log to syslog
+    bool isDaemon; // true == spawn in background, log to syslog except if log file parameter is set
+    bool logToSyslog;
     const char *fuseArgv[MaxFuseArgs];
     int fuseArgc;
 };
@@ -737,6 +738,7 @@ static bool processArgs(int argc, char *argv[], LoggedFS_Args *out)
 {
     // set defaults
     out->isDaemon = true;
+    out->logToSyslog = true;
 
     out->fuseArgc = 0;
     out->configFilename = NULL;
@@ -774,6 +776,7 @@ static bool processArgs(int argc, char *argv[], LoggedFS_Args *out)
             return false;
         case 'f':
             out->isDaemon = false;
+            out->logToSyslog = false;
             // this option was added in fuse 2.x
             PUSHARG("-f");
             defaultLogger->info("LoggedFS not running as a daemon");
@@ -795,7 +798,8 @@ static bool processArgs(int argc, char *argv[], LoggedFS_Args *out)
             break;
         case 'l':
         {
-            defaultLogger->info("LoggedFS log file : %v", optarg);
+            defaultLogger->info("LoggedFS log file : %v, no syslog logs", optarg);
+            out->logToSyslog = false;
             el::Configurations defaultConf;
             defaultConf.setToDefault();
             defaultConf.setGlobally(el::ConfigurationType::ToFile, std::string("true"));
@@ -909,7 +913,7 @@ int main(int argc, char *argv[])
     if (processArgs(argc, argv, loggedfsArgs))
     {
 
-        if (loggedfsArgs->isDaemon)
+        if (loggedfsArgs->logToSyslog)
         {
             dispatchAction = el::base::DispatchAction::SysLog;
             loggerId = "syslog";
diff --git a/test.sh b/test.sh
new file mode 100755
index 0000000..71707e9
--- /dev/null
+++ b/test.sh
@@ -0,0 +1,49 @@
+#!/bin/bash
+
+TEST_DIR=/tmp/test-loggedfs
+mkdir $TEST_DIR
+
+####################################################################
+## Test 1: log actions in a file
+####################################################################
+
+# launch loggedfs
+./loggedfs -l ~/log.txt $TEST_DIR
+
+# create file
+echo "bar" >> $TEST_DIR/foo && ls $TEST_DIR
+sudo umount $TEST_DIR
+
+# make sure the actions have been logged in the log file
+COUNT=$(grep -c "write 4 bytes to $TEST_DIR/foo at offset 0" ~/log.txt)
+if [ "$COUNT" -ne "1" ]; then
+  echo "write should have been logged in file"
+  exit 1
+fi
+
+# make sure the actions have not been logged in syslog
+COUNT=$(grep -c "write 4 bytes to $TEST_DIR/foo at offset 0" /var/log/syslog)
+if [ "$COUNT" -ne "0" ]; then
+  echo "nothing should have been logged in syslog"
+  exit 1
+fi
+
+rm ~/log.txt
+
+####################################################################
+## Test 2: log actions to syslog
+####################################################################
+
+# launch loggedfs
+./loggedfs $TEST_DIR
+
+# create file
+echo "bar" >> $TEST_DIR/foo2 && ls $TEST_DIR
+sudo umount $TEST_DIR
+
+# make sure the actions have been logged in syslog
+COUNT=$(grep -c "write 4 bytes to $TEST_DIR/foo2 at offset 0" /var/log/syslog)
+if [ "$COUNT" -ne "1" ]; then
+  echo "write should have been logged in syslog"
+  exit 1
+fi
\ No newline at end of file