refine log output and variable types