refactor mechanism of create/rename/remove files and dirs