use a debug function with time stamps