Check environment variable if ws should be cleaned up.

Signed-off-by: Florin Hillebrand <florin.hillebrand@streamunlimited.com>