minor refactor in File