public void addDownloadFromFileName(String fileName) {
        try {
            byte[] content = FileReader.readByteArray(fileName);

            // TODO: Maybe, need real (but simple) check of file format
            if (content.length < 3) {
                throw new RuntimeException("Wrong file format");
            }

            if (fileName.toLowerCase().endsWith(".torrent"))
                taskManager.addTorrent(content);
            else if (fileName.toLowerCase().endsWith(".metalink"))
                taskManager.addMetalink(content);
        } catch (IOException e) {
            Arietta.handleException(e);
        }
    }