Changed the code so that the onProgress and the onError event of the ImageLoader are used