Requires file errors.txt: Error handling to write incorrect password and no device paired errors to error file with date and study ID.