Another working version- problems: kate saves bookmarks even when you don't save the document,when reading from session, every time it writes one by one(the mutex doesn't do it's job