edited file and added consistent catch block