FileSource Plugin - Code refactoring