add function: logFrame