make mkconf file executable and fix remove code