Added error checking
Added error checking

goddardl/cortex,hradec/cortex,davidsminor/cortex,davidsminor/cortex,danieldresser/cortex,lento/cortex,goddardl/cortex,danieldresser/cortex,appleseedhq/cortex,goddardl/cortex,hradec/cortex,lento/cortex,danieldresser/cortex,davidsminor/cortex,lento/cortex,appleseedhq/cortex,danieldresser/cortex,appleseedhq/cortex,hradec/cortex,davidsminor/cortex