We need to handle exceptions properly.