Changed the condition of updating logfile to have the word 'commit' in it.