To reduce the inconsistency of message printing created a function which can be called from both kubernetes and openshift