Preparing to open file