Improved debug_mode output, fabs fix