Try-Catch for writing.