add winston logger
amend headerToJSON in order to make dictionary an optional parameter