fixed file open issue