
This function switches to a new file for logging data for the publication.
If the file is NULL a new file name will be generated based on the previous file name by appending
or replacing a datetime field in the file name.
