Added condition to check if stage is in url
Updated condition to test for stage.
Reverted to original state of stage env check.
Adjusted condition checking for stage env.