Added logToFile