def decode_archive():
    try:
        print 'decoding archive...'
        encoded_archive_bytes = FileUtils.readFileToByteArray(
            File(node_archive_path))
        decoded_archive_bytes = Base64.getMimeDecoder().decode(
            encoded_archive_bytes)
        FileUtils.writeByteArrayToFile(File(archive_name),
                                       decoded_archive_bytes)
        print 'successfully decoded archive'
    except:
        print 'Decoding application archive failed'
        print dumpStack()
        apply(traceback.print_exception, sys.exc_info())
        exit(exitcode=1)