Different changes

Added documentation for secondary indexes, fixed logging if \n is missed.