decode bytes coming from stdout/stderr