finish train file