Get encryption working. Weird/hacky solution (write then read file)