grabbing keys in constructor in case some missing. Using #define so can use elsewhere. Sample of writing to stream. uncommented the parameters since they are required.