Added return code parsing