Added additional debug and error for console output