The main issue appears to have been the call to close() in the wrong place.
treebdd0a527486542155d5112a9baec922b3b114dac
-rw-r--r-- 330 .gitignore
-rw-r--r-- 346 CMakeLists.txt
-rw-r--r-- 65348 Doxyfile
-rw-r--r-- 35068 LICENSE
-rw-r--r-- 1815 README
lrwxrwxrwx 19 aesalon -> src/monitor/aesalon
lrwxrwxrwx 19 aesalon_gui -> src/gui/aesalon_gui
-rw-r--r-- 279 build.config
-rwxr-xr-x 2168 newclass.pl
drwxr-xr-x - src
-rwxr-xr-x 284 version_info.sh