modification to open file