implement the FileSelector and the test code