no use checking for collisions if either fileName or  fileNamePattern are null