write pid and ppid to log
write log
rework on length calculations
Finish debugging on length, usable now!!!