added error detect for download