File write success check