Fix image throwing Exception instead of aeImageException.
Refactor file library.