fix install file as directory issue