change raising of error to just logging it