Good idea to output debug messages before an error can occur.