add error checking for ptrace
add an example to the README