Add test for writing output bins