pulled out checkin into own process, added logging