added logs and improved stdout formatting