app: also check for errors on closing the file in xcf_save_invoker()

and improve the error message.