Extracting written string from the write syscall