Added checks if log file exists