Added automatically saving/loading grammars when process is interrupted