added relative path to find json files when a custom directory is required