FlashFileSaver fixed, added IOError case for flash target.

FlashFileSaver was not working properly, also added support for IOError events.