Removed attempt at writing log file before it's been opened