Changed printlns to logging.