logging cleanup and otherwise