Add error handling to nginx conf