Modified and refactored log output to be more consistent