write and read from files (no XML)