Improving remote syncing script