Config variable to specify a resource

I just rewrite my patch from #14. I hope you like this version better.