check the return error