Add wrapper for fwrite() and update saveTo{Bin,Hex}()