Iterative learning control of direct write additive manufacturing using online process monitoring