Add Log func

Add log fun
log will stay in C:\ or D:\upsdata\