check environment variable DEBUG_RECORD for record logging