Some logging and code improvement