change the debug statements to ```debug_error e```... forgot this was available