generate the file of which type by suffix