Fix syntax errors, move logs, stamp recursion