Error-fix (close and if not exist)