threading and master exception handling