Added rudimentary exception handling