refining syncfile and adding syncdir for special cases