file handling/speed improvements for ImageManager