added chmod hook