Add a test for opening an already opened file for writing in a not