G_LOGFILE="/home/user/logs/cloudsync.txt" echo "logger text and output.." >> $G_LOGFILE # after removing the lock file xdg-open /home/user/logs/cloudsync.txt