Add test for output size of writer. Fix wrong size for boolean.