added file seek to commit method