extracting getting file path functionality to sepatate function