fix state file loading + killing of timedout commands
then saving state recreate state file if something deleted it