Rename and move InitFileposition function.