I got a big file and I would like to replace the first line with other content.
When I use `{ok, IoDev} = file:open("/root/FileName", [write, raw, binary])`, the whole content is removed.

But when I use `{ok, IoDev} = file:open("/root/FileName", [append, raw, binary])` and `file:pwrite(S, {bof,0}, <<"new content\n">>)`, I got the result `{error, badarg}`.

If I set Location to 0: `file:pwrite(S, 0, <<"new content\n">>)`, the string is appended at tail of the file.