correct killing line.
png optimizer: Move all iterations into a function.
correct png optimizing. Add wait and correct syntax of while.
correct processing lines for png.
move filename into a variable LOGFILE.