fixed trainfile issue