added import\export commands, added main thread interupt