Improved error reporting on filters.

Avoid showing spurious output and avoid double error messages.