moved logger to appropriate place