Proper pre-commit hook