added file open method