Using Print fuction to replace fio_write