Set up file opening