update script for better log formatting