Renamed 'ok' variable to 'err'.