If the filename of the toc is shorter than 4 chars checking if the filename ends with ".cue" used to throw an error. We first need to check if the filename is at least 4 characters before we can take the substring of the last 4 chars to compare to ".cue".
If the filename of the toc is shorter than 4 chars checking if the filename ends with ".cue" used to throw an error. We first need to check if the filename is at least 4 characters before we can take the substring of the last 4 chars to compare to ".cue".