cleanup and sync script