Added error handling code

Added error handling code

Added logger warning when an extracted image could not be written to
file due to lack of png writer.

Jeremy. Allen. WIldsmith