reformat hook scripts output