Added error to catch statement