Fix rare bug, when nextTick is executed after IO. Replaced with try..catch