Check return values of a few function