moved logger line to only print once