logging added, preassemble/assemble fixed