read class from file