Set trait in different file formats