Console: fixed returning of result in case of error