Added a console and a log file for debugging