Must pass resource not str