changed hook behavior so as to it concerns only platform dependent tasks