Got repo and file listing to function

Needs work if the file does not exists yet