added options file (saves the selected folder) and minor stability improvements