Fix opening file