Fixing correct usage of log file