Added class members checking + error handling