added a condition for creating single trait temp file for multiple datasets list