Again, properly deal with filetypes for BufWrite