Change file mode back to rb+ so that we can write to the file.