Added quick check to look for debug argument.
Added timestamps to error messages for debugging.