Better thread handling, renamed main.py to szreader.py