Added extra debug information to output in debug mode