Added console read/write logging.