with segfault error trap