better error stderr checking, added note about curly braces