updated tfile to fileinpath