private static File findFile(String filename, LinkedList files) {
        File temp;
        int i = 1;
        temp = (File) files.get(0);

        while ((i < files.size()) && (!filename.equals(temp.getName()))) {
            temp = (File) files.get(i);
            i++;
        }

        if (temp.getName().equals(filename)) {
            return temp;
        } else {
            return null;
        }
    }