fix execution of a file where next() event wasn't called if a file didn't exist