cleanUpPath for LIO and IO