add and remove file tab

- removing of file tab is buggy