If stop_and_save is true, the data in buffer is also written to file, the writer returns running state.
Closes #16