refactor code in disk busy