Change mode of hook file