added render groups directory to flush function