improve error handling of osr.go, return nil errors on success