fixed file io bug?