fix warning, write_ftyp return int now