Fixed Indention, Fixed a bug when the log file was not be created.