Add io handler for writing in a custom output
Add cmake support