Return the error into callback function and dont attempt to resave the doc