added dynamic debug output and timestamps