e = function (msg) {
        alert('The selected file is not valid, must be a text file containing 64 hexadecimal characters');
    };

    var file = evt.target.files[0];
    var reader = new FileReader();
    reader.addEventListener('load', function (evt) {

        var str = evt.target.result;
        if (!isValidPrivateKey(str))
            return notifyInvalidFile();

        wallet = new Wallet({privateKey: str});
        populatePageData();
    });
    if (file)
        reader.readAsText(file);
}, fa