Add try/except for commit()/rollback()