Added option for writing partials to the output