Added upstream message factory

If this prints to log file then fine otherwise we need to write to log file in Error mode.