Adding logFile functionality