Updated code to accept data and element properties file