add try catch, finally on shutdown -ab