Separated out logging and debugging features.