[bugfix] get error code from exec()