Fix decode for case when stdin is not present for example when running under jenkins