Fixed bug with empty log files