Add detached mode to run