check if the package already exists and return a different error code