use logger to handle output