fix for NO_MORE_FILES return code