Refactor FileSelectedListener to have another method for input database file