Fix logic error with touching/unlinking of switch file