Added possibility to check for error on final status