Select correct file using a modal, close #1291