fixed session behaviour, added file remembering