Correctly output the sample content in the file publisher

This fixes bug #1224190.

Change-Id: I4faf06febac0eb7e1663ef2c68763930c19ca6a4
Merge "Correctly output the sample content in the file publisher"