Some more params are optional
Better documentation for isValidSource function
Correct return type for getFilePath