optimize for creating debug log