added additional pauseflag check, added production argument