Fix #947: exit nice if no permission to write log