Remove print statements, fix logging