fix bug in CCPrint.to_file