Extracted File finding logic from Application class.