moved fileName() function