SD Card: dynamic file name

However...
When the day changes, it creates an error once only...

[later edit / update: but does not create this error again, despite not writing a file at all...]

-> Writing data to log file: 20170701.CSV
-> Error opening: 20170702.CSV
-> Writing data to log file: 20170702.CSV

The docu says that if the file does not exist it will be created.
How can I avoid this error?