Make sure file contents are a string before rendering