use new truncate_filename function