Keeping main thread alive