added truncate_filename function