Fix NPE when updateSelection() in SelectFileFragment is called too early
Fix FindBugs results