Pull some safe code out of a try block