Added logs. Improved use.