Some logging-related fixes.

- Fixed up log.h
- Added debug.h
- Removed error.h