add logging for debug_mode