implemented file name from format and pattern