If 'fail' option is provided, give curl's error message to callback as 'err'