Rebuilt project. Added catcher for whole process to avoid unexpected shutdown.