Added exception handling to application instantiation
Fix potential NPE in AbstractDevice#equals()