fixed bug with debug.log file getting crazy bit