added code for file open