Url fix

Fix #582 

- [ ] Add tests for get_file_location