Plugged in proper error handling