application exits when finished receiving files