File name generation has been surrounded by a file lock to avoid that multi istances of the program generate same file name