Modularize ptrace sandbox