add 5 log_ macros and a dir function