added usage log changes, and global flag tests