bug with cancel opening file fixed