Replaced the UNUSED() with code that actually checks the return values.