Improved the details print function