Remove print statements and add a console handler.