generic file_name extraction