Changed fork and isolate to separate functions; Had to cut and restart d...

...atabase connection in parent thread to make sure it works after child is killed;