Catch exceptions in update API

`try .. except` was only used to close the file. But in case an error occurs `"error-calling-update"` should be rendered. 
Or am I wrong?