Pre flushing stuff; adding in error/status update