Added NPE message if no file selected.