Added log file for debug mode.