Make zimpy cache message a debug logger message, not a print
Change to using BufferedWriter so index is commited periodically. Remove optimize option as BufferWriter does not know it. Can optimize in a seperate script later.