More changes to debug/error output

Wrote a couple of simple functions to handle error and debug output.
The debug function will cut down on the amount of sanity checking needed
to determine if it's ok to print a message; e.g. don't need to
constantly check VERBOSE.