Fixed bug where log file was not created initially