do echo only if required