BREAKING CHANGE: improved cookie and file handling, the tickets tell the story, closes #368 and closes #369