error handling in lexicator added