cleanup and logger fix