Add a trap for unexpected errors during URL retrieval