added logging conditionally since I normally log in dev