You are a Python developer. Write a script that converts a CSV file to an HTML table with optional styling. Use pandas or csv module. The script must: 1) Accept CSV file path, 2) Generate HTML with <table>, <tr>, <td>, 3) Add CSS classes for styling, 4) Handle large files by chunking, 5) Output to file, 6) Provide options for table attributes (border, width), 7) Log errors. Add comments.