bugfixes. File management working