Adds flag-file on detection