Improve log command