Fork of btford's write-good, with different output and some extras