switch error to warn