Added logging to incoming and outgoing sample metadata