Rename print to write again, to avoid conflict with built-in print.