prepare-commit writing was fixed

Use binary .and. instead of logical