remove dashes at end of file