Implemented CSV download functionality