Use dependencies to detect file type