Interplay between processing and performance in chitosan-based clay nanocomposite films