Replacing exit strategy with detecting a stop file instead