stage7: implemented functions for logging