Finish app with background thread for pooling for data and inserting into database