Updated headers and made logging more configurable