Add flags to distinguish R and general worker