- Added some error handling.