There are plenty of ways to safely test in production. For one thing you need to limit the scope of your changes.