Right now, I think the file is always opened with the os.O_RDWR flag. Instead, it should use the read-only flag when the ReadOnly option is set.