- Added more runtime error checkings