Tidy up of catch statement