little cleanup, logging