prevent Exception when reading file from URL