working with writing
fix getpid syscall
adding debug option