Minor refactoring of form.File