Decreased wait time at the end of cycle.
Deleted Debug message
closed file after checking