Added server logs flushing. Removed excessive logging.