Fixed typos, added exception handling for ClassNotFoundException