Add threading for scripts, add confirmation msg after code export