add fput into error case of do open