Fix bug that unsets currentFile if user clicks 'Cancel' on the 'Open file' dialog