Long Filenames Loop bugfix

If filename cannot be reduced, loop must break and then display error.