I ended up here, was confident I had included the $ spent a few hours scratching my head, found the problem, compare the difference between
this->$filename = $filename; // incorrect
and
$this->filename = $filename; // correct
the $ is there in both instances, but it helps if you put it in the right place
;-)