use is_open, add gunicorn logging