Add a helper function to create a chapters file directly