Added some debug output for some errors