log before executing