Adding env catching