Check outcome of system calls