Change logged warning to match thrown error