Bugfix
Fixed the bug where the program left a zombie process after every wait().
It seemed this was caused due to not closing the file stream from popen().