stop if file names don't have correct indexes