added debug logging
cleaned up log messages