function to make beast2 file