massive debugging on the way

- do not sync
- deal only with first time replication
- add tests for filesystem module
fix local existence function

+ fix get by key function in db module