rotate script cleanup