handling exception on downloadFile (img)