Add function to truncate a file