added logging functions

merged in changes from RC