small fixes in output, perl, script templates