Started with test for synchronizeStep

+ multiple fixes
Adding test for file deletion + fixes