cleanup logging and tests