Fix param # calculation for Before functions
Allow writing to file or stdout
Create a new instance of the resource on every request