fix broken stand alone file encryption routine