Updated sample generator with warning message