Modifications to debug messages handling