Writing header, still lacks the magic number