Should check return code before using result.