fix typo: generalise error message

The error message was previously saying it failed to initialise the PNGWriter, when really it could've been any of the three image writers.

This patch makes the error message more clear, increasing debug-ability.