add logging and timestamp support