I don't think writ of mandamus will work when an application is stuck in security screening. I know someone with the same status submitted writ of mandamus, didn't work.
This is absolutely not true. Do your research properly, there are countless number of people stuck in security screening that have received positive results through Mandamus. Do yourself a favour, speak to a competent Immigration lawyer today and thank me later.