Modified code to extract the time series of a specified set of users and save them in a specified directory.