prevent write core dump file

add function to prevent write core dump file