Added function to set app env