Check return value properly.