Fixing open with r+ problem