Fix text loader bugs: error handling and url