private static byte[] scanKeyFile(CryptobyConsole console) {
        scanner = new Scanner(System.in);
        byte[] tempKey = null;
        do {
            System.out.println("\nAllowed Key Sizes 128,192 and 256 Bit.");
            System.out.println("Enter Path to Key File (Type '" + quit + "' to Escape):");
            if (scanner.hasNext(quit)) {
                aesCrypterFile(console);
            }
            keyPath = scanner.next();
            try {
                tempKey = CryptobyFileManager.getKeyFromFile(keyPath);
            } catch (IOException ex) {
                CryptobyHelper.printIOExp();
                aesCrypterFile(console);
            } catch (NumberFormatException nfex) {
                System.out.println("Key File format is not correct!");
                aesCrypterFile(console);
            }
            keySize = tempKey.length * 4;
        } while (keySize != 128 && keySize != 192 && keySize != 256);
        return tempKey;
    }