Disabled creation of Logfile if debugToFile is false

Added condition to check if debugToFile is true before creating Logfile.