Have one error files per layer
Merge pull request #210 from sbrunner/error-layer

Have one error files per layer
Get an error when the result image has the grong type.