Replace print with log