changed hook parameters, removed code for perl execution of append_if_no_such_file and sed, because it doesn't work as expected.