fix out.close()