logging and test cleanup