add new files and switch panels logic