Just dump the file contents to the output stream when calling
serialize()