Changed most @warn to @error