fix mkdir core dump