fixed file seek/tell, fixed xgmath dump code