Fixes error message in CHECK_ERR macro

Had used literal 'str' as opposed to the variable