re-implement strace