Fix bug: deleteDir should not delete file with matching name Don't exit loop if name does not match Use startsWith() rather than match() as it's simpler and quicker