Moved method from BaseController
Added debug info for casper tests