changed how the print hook works: all text must be returned