internal flush function for logger