Spelling mistake fixed
Made all error messages send output to stderr