Now that we flush() earlier, we need to catch the exception earlier