script for stability plots with multiple files