Add guard for testing env.