Added existence validation to file mock.