added error handling of unchecked exceptions