```dbEndWrite()``` will not be called in this early return - is that a problem? Maybe you need to do a rollback here?