Fixed previous commit

Ooops, it should actually check the return value, not just ignore it...