changed  logger behavior to overwrite instead of append