cleaned up the logging for debugging.