Add "preamble" output option

Close #335