Functionality to open the file