move close into core io