Cleaned up the output logging