Fixes #5011
change naming test case
change mode from "r" to "r+"
Merge pull request #5594
Merge pull request #5594 in master