Added get file from url and refactoring