adding a / at the end of dir path for sync to work properly