truncate file name to prevent it from becoming too long.