mark(): throw an error if the stream is already marked