Added a try around writeLastBrew()