small fixes, don`t encode failures twice. Validation script fixes

Signed-off-by: Justas Balcas <juztas@gmail.com>
Merge pull request #4387 from juztas/small_fixes

small fixes, don`t encode failures twice. Validation script fixes