fix routing error when deleting file