Avoiding throwing an error and instead warning