Don't try to write to response output stream

if it closed