Separate thread for syncing keys implemented