fix TypedFileField bug: set file pointer back to begining of the file
refactor TypedFileField