How to identify failed syscalls