Adds -nodetach flag (like test without debug info)
Fixing if else statement