Added debug option which will output messages to console
Added log file options