fix log on mirror script
add hook support
hook example