Make PtraceWrapper to preserve errno value after ptrace call while performing logging which may change errno by itself.