Remove print statement and add console handler