David Hamilton, the Scottish Information Commissioner, criticised the Scottish Government over its handling of the case