Added error message to sample consturtion