Return the error if file written could not be closed.