Update utils.py

Fix for gunicorn's LazyWriter