Fixing bug in test: Writing to a file who was deleted from other gorutine