Changed the try block around so that the entire bit of code doesn't die when a exception happens