included missing header, fixed faulty string formatting
fixed incompatibility with ptrace on freebsd