Moved tags file generation to different Thread
Finally got it working satisfactory. The generation will not be
interrupted by repeated saving, and will only run when no thread is
generationg tags.