fixing detect file