Implemented improved debug.log