fixed logging, update for implementing full invoice cycle