Set variable eralier to hinder invocation of method more than once

* remove debug output