added basic sync recording functionality with system call and fork