fix on file close for server