Don't throw an error if flushing the output buffer fails. Closes #3201