Fix macro: add spaces where needed
Need index value in macro for recording timestamps
Update macro for conditional processing