Fixed error in sync_data) if log directory already exists