Fix #611; also swap print statements out for loggers