Overwriting just selected bytes inside an existing file is very rarely what you want to do, particularly for text files, which you are more likely to want to see as sequence of lines of text, rather than bunches of bytes! (It can be useful in very specialized cases, mostly involving large binary files, where the by-byte view may make some sense).