header,footer: Added proper logging functions.