file cleanup and cycle init