Added OutOfMemory catch and retry for loading images from the file system